package com.ai.bitcoin.constant;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class UrlConstant {

    private static final Logger logger = LoggerFactory.getLogger(UrlConstant.class);

    public static String PAY_CALL_URL = null;

    static {
        String payCallUrl = System.getenv("PAY_CALL_URL");

        if (!StringUtils.isBlank(payCallUrl)) {
            PAY_CALL_URL = payCallUrl;
        }
        else {
            PAY_CALL_URL = "http://localhost:8080/bitcoin-data/pay/";
            // it should not happen!
            logger.error("PAY_CALL_URL is empty!");
//			throw new RuntimeException("PAY_CALL_URL is empty");
        }

    }

}
